package com.halflife.framework.generator.template.mapper;

/**
 * Created by zhaoyf on 2018/6/18.
 */
public class SelectListByPageAnalysis extends BaseAnalysis {
    public SelectListByPageAnalysis(Class clazz) {
        super(clazz);
    }

    @Override
    protected void setPrefix() {
        this.xmlStr.append("<select id=\"selectListByPage\" resultMap=\"BaseResultMap\" >\n");
        this.setBindStr();
        this.xmlStr.append("\t select \n");
        this.xmlStr.append("\t <include refid=\"Base_Column_List\" />\n");
        this.xmlStr.append("\t from " ).append(this.joinStrs.toString());
        this.xmlStr.append("\n\t <where> \n");


    }
    protected void comma() {

    }



    @Override
    protected String getValue1(CustomField customField) {
        return this.getQueryString(customField);
    }
    protected void setSuffix() {
        this.setEndQueryString();
        this.xmlStr.append("\t </where> \n");
        this.setOrderQueryString();
        this.xmlStr.append("\t limit #{currentPage_} , #{pageSize_}\n");
        this.xmlStr.append("</select>");
    }

    ;
}
